<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
 <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>   
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>글목록</title>
<style type="text/css">
#content{
	width :650px;
	border-collapse: collapse;
}
td{
	padding: 5px;
}
</style>
</head>
<body>
<center>
<div id="div">
<h2>글목록</h2>

<table id="content" border="1">
	<tr>
		<td width="65px">글번호</td>
		<td>제목</td>
		<td width="80px">작성자</td>
		<td width="60">작성일</td>
		<td width="60">조회수</td>
	</tr>
	<!-- ---------------------------------------------------
	글목록 작성
	------------------------------------------------------- -->
		<c:forEach items="${requestScope.lto.list }" var="bto">
			<tr>
				<td>${bto.no }</td>
				<td>
					<c:forEach begin="1" end="${bto.relevel }" step="1">&nbsp;&nbsp;&nbsp;</c:forEach>
					<c:if test="${bto.relevel!='0' }">→RE:&nbsp;</c:if>
					<a href="getContent.do?no=${bto.no }">${bto.title }</a>
				</td>
				<td>${bto.writer }</td>
				<td>${bto.writedate }</td>
				<td>${bto.viewcount }</td>
			</tr>
		</c:forEach>
</table>
<p>
<table>
	<tr>
		<td><c:if test="${requestScope.lto.pagingTO.previousPageGroup}"><a href="/board_spring_ann_ibatis_inst_test/list.do?page=${requestScope.lto.pagingTO.startPageOfPageGroup-1 }">◀</a></c:if></td>

		<c:forEach begin="${requestScope.lto.pagingTO.startPageOfPageGroup }" end="${requestScope.lto.pagingTO.endPageOfPageGroup }" step="1" var="no">
			<td>
				<a href="/board_spring_ann_ibatis_inst_test/list.do?page=${no }">
					<c:choose>
						<c:when test="${no==requestScope.lto.pagingTO.currentPage }"><h2>${no }</h2></c:when>
						<c:otherwise>${no }</c:otherwise>
					</c:choose>
				</a>
			<td>
		</c:forEach>

		<td><c:if test="${requestScope.lto.pagingTO.nextPageGroup}"><a href="/board_spring_ann_ibatis_inst_test/list.do?page=${requestScope.lto.pagingTO.endPageOfPageGroup+1 }">▶</a></c:if></td>
	</tr>
</table>

<a href="/board_spring_ann_ibatis_inst_test/write_form.jsp">글쓰기</a>
<br>
</div>
</center>
</body>
</html>















